/PROG  PNS0046
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53191797C ";
PROG_SIZE	= 3350;
CREATE		= DATE 15-07-02  TIME 15:16:42;
MODIFIED	= DATE 25-04-29  TIME 18:23:44;
FILE_NAME	= PNS0048;
VERSION		= 0;
LINE_COUNT	= 117;
MEMORY_SIZE	= 3818;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0008 ;
   7:  !  PART:53191797 ;
   8:  !ZYL15.7.2*********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.2    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:  R[5]=10    ;
  25:  OVERRIDE=R[5] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  29:  PAUSE ;
  30:  R[1]=0    ;
  31:  TIMER[1]=RESET ;
  32:  TIMER[1]=START ;
  33:   ;
  34:  LBL[10:TOP OF LOOF] ;
  35:  OVERRIDE=R[5] ;
  36:   ;
  37:  TIMER[3]=STOP ;
  38:  TIMER[2]=STOP ;
  39:  R[1]=R[1]+1    ;
  40:  R[2]=TIMER[2]    ;
  41:  R[3]=60/R[2]    ;
  42:  R[8]=TIMER[3]    ;
  43:  TIMER[2]=RESET ;
  44:  TIMER[2]=START ;
  45:  TIMER[3]=RESET ;
  46:   ;
  47:  !PROCEED TO PICK ;
  48:  LBL[20] ;
  49:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  50:  IF DI[29]=ON,JMP LBL[90] ;
  51:  JMP LBL[20] ;
  52:   ;
  53:  LBL[25] ;
  54:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  55:  TIMER[3]=START ;
  56:  R[5]=100    ;
  57:  OVERRIDE=R[5] ;
  58:J P[3:PICK APPROACH] 100% CNT60 ACC100    ;
  59:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[4] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 50% CNT50 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
  64:  DO[8]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:  LBL[30:GOTO DROP POUNCE] ;
  70:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  71:  TIMER[3]=STOP ;
  72:  LBL[40:AT DROP POUNCE] ;
  73:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  74:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  75:  IF DI[18]=ON,JMP LBL[60] ;
  76:  JMP LBL[40] ;
  77:   ;
  78:  LBL[50:MOVE DROP SNEAK] ;
  79:  TIMER[3]=START ;
  80:  OVERRIDE=R[5] ;
  81:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  82:  LBL[51:DROP OR C-P-S] ;
  83:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  84:  IF DI[18]=ON,JMP LBL[40] ;
  85:  JMP LBL[51] ;
  86:  JMP LBL[50] ;
  87:   ;
  88:  LBL[60:MOVE CLS-PRS-ACC] ;
  89:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  90:  PAUSE ;
  91:  JMP LBL[30] ;
  92:   ;
  93:  LBL[80:DROP ENABLED] ;
  94:  !PROCEED TO DROP ;
  95:  TIMER[3]=START ;
  96:  OVERRIDE=R[5] ;
  97:J P[10:DROP APPROACH] 100% CNT40 ACC100    ;
  98:  MONITOR END Z_CHECH ;
  99:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC110    ;
 100:  DO[6]=PULSE,1.0sec ;
 101:  PAYLOAD[3] ;
 102:  CALL CHK_DROP    ;
 103:   ;
 104:J P[12:DROP DEPART] 100% CNT70 ACC130 TA    .01sec,DO[7]=PULSE,1.0sec    ;
 105:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 106:  !GOTO PICK POUNCE ;
 107:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 108:  IF DI[29]=ON,JMP LBL[90] ;
 109:  JMP LBL[10] ;
 110:   ;
 111:  LBL[90:END OF CYCLE] ;
 112:  TIMER[1]=STOP ;
 113:  R[4]=TIMER[1]    ;
 114:J P[1:MIDDLE] 50% CNT100    ;
 115:  MOVE TO HOME    ;
 116:   ;
 117:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -987.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.336  mm,	Y =  1576.000  mm,	Z = -1066.400  mm,
	W =   179.322 deg,	P =     1.370 deg,	R =   150.804 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2608.136  mm,	Y =  3280.184  mm,	Z = -1144.654  mm,
	W =  -179.257 deg,	P =      .157 deg,	R =    91.689 deg,
	E1=   195.085 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2608.135  mm,	Y =  3280.184  mm,	Z = -1281.452  mm,
	W =  -179.257 deg,	P =      .157 deg,	R =    91.689 deg,
	E1=   195.085 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2608.136  mm,	Y =  3280.183  mm,	Z = -1012.655  mm,
	W =  -179.257 deg,	P =      .157 deg,	R =    91.689 deg,
	E1=   195.085 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2162.283  mm,	Y =  1807.974  mm,	Z = -1007.017  mm,
	W =   179.311 deg,	P =      .166 deg,	R =   139.944 deg,
	E1=   146.756 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2087.104  mm,	Y = -1183.282  mm,	Z = -1000.000  mm,
	W =  -179.842 deg,	P =      .508 deg,	R =  -153.605 deg,
	E1=    80.454 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2293.291  mm,	Y = -2310.024  mm,	Z = -1003.702  mm,
	W =  -179.617 deg,	P =      .243 deg,	R =  -125.008 deg,
	E1=    51.920 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2597.483  mm,	Y = -3240.984  mm,	Z = -1035.252  mm,
	W =   177.621 deg,	P =    -4.296 deg,	R =   -90.595 deg,
	E1=    17.709 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2597.481  mm,	Y = -3240.983  mm,	Z = -1232.000  mm,
	W =   177.621 deg,	P =    -4.296 deg,	R =   -90.595 deg,
	E1=    17.709 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2601.659  mm,	Y = -3246.682  mm,	Z = -1118.386  mm,
	W =   177.621 deg,	P =    -4.296 deg,	R =   -90.595 deg,
	E1=    17.709 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2153.899  mm,	Y = -1415.621  mm,	Z = -1121.236  mm,
	W =  -179.274 deg,	P =      .468 deg,	R =  -145.609 deg,
	E1=    71.616 deg
};
/END
